using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VGGBST
    {
        public DataRow Convert2GGBST(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGGBST(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["GGMANDANT"] = " ".PadRight(2 ); 
         dwReturn["GGSA"] = " ".PadRight(2 ); 
         dwReturn["GGART"] = " ".PadRight(20 ); 
         dwReturn["GGVAR"] = " ".PadRight(3 ); 
         dwReturn["GGFARBE"] = " ".PadRight(10 ); 
         dwReturn["GGZENSUR"] = " ".PadRight(1 ); 
         dwReturn["GGLO"] = " ".PadRight(2 ); 
         dwReturn["GGMJJ"] = " ".PadRight(4 ); 
         dwReturn["GGMM"] = " ".PadRight(2 ); 
         dwReturn["GGAKTKZ"] = " ".PadRight(1 ); 
         dwReturn["GGME01"] = " ".PadRight(0 ); 
         dwReturn["GGME10"] = " ".PadRight(0 ); 
         dwReturn["GGME11"] = " ".PadRight(0 ); 
         dwReturn["GGME12"] = " ".PadRight(0 ); 
         dwReturn["GGME13"] = " ".PadRight(0 ); 
         dwReturn["GGME20"] = " ".PadRight(0 ); 
         dwReturn["GGME21"] = " ".PadRight(0 ); 
         dwReturn["GGME26"] = " ".PadRight(0 ); 
         dwReturn["GGME27"] = " ".PadRight(0 ); 
         dwReturn["GGME30"] = " ".PadRight(0 ); 
         dwReturn["GGME31"] = " ".PadRight(0 ); 
         dwReturn["GGME32"] = " ".PadRight(0 ); 
         dwReturn["GGME33"] = " ".PadRight(0 ); 
         dwReturn["GGME34"] = " ".PadRight(0 ); 
         dwReturn["GGME35"] = " ".PadRight(0 ); 
         dwReturn["GGME36"] = " ".PadRight(0 ); 
         dwReturn["GGME37"] = " ".PadRight(0 ); 
         dwReturn["GGME38"] = " ".PadRight(0 ); 
         dwReturn["GGME40"] = " ".PadRight(0 ); 
         dwReturn["GGME41"] = " ".PadRight(0 ); 
         dwReturn["GGME42"] = " ".PadRight(0 ); 
         dwReturn["GGME43"] = " ".PadRight(0 ); 
         dwReturn["GGME46"] = " ".PadRight(0 ); 
         dwReturn["GGME47"] = " ".PadRight(0 ); 
         dwReturn["GGME50"] = " ".PadRight(0 ); 
         dwReturn["GGME51"] = " ".PadRight(0 ); 
         dwReturn["GGME52"] = " ".PadRight(0 ); 
         dwReturn["GGME53"] = " ".PadRight(0 ); 
         dwReturn["GGME55"] = " ".PadRight(0 ); 
         dwReturn["GGME56"] = " ".PadRight(0 ); 
         dwReturn["GGME57"] = " ".PadRight(0 ); 
         dwReturn["GGME58"] = " ".PadRight(0 ); 
         dwReturn["GGME73"] = " ".PadRight(0 ); 
         dwReturn["GGME76"] = " ".PadRight(0 ); 
         dwReturn["GGME77"] = " ".PadRight(0 ); 
         dwReturn["GGME78"] = " ".PadRight(0 ); 
         dwReturn["GGME80"] = " ".PadRight(0 ); 
         dwReturn["GGME88"] = " ".PadRight(0 ); 
         dwReturn["GGME89"] = " ".PadRight(0 ); 
         dwReturn["GGME90"] = " ".PadRight(0 ); 
         dwReturn["GGME91"] = " ".PadRight(0 ); 
         dwReturn["GGME92"] = " ".PadRight(0 ); 
         dwReturn["GGME93"] = " ".PadRight(0 ); 
         dwReturn["GGMER03"] = " ".PadRight(0 ); 
         dwReturn["GGMER04"] = " ".PadRight(0 ); 
         dwReturn["GGMER05"] = " ".PadRight(0 ); 
         dwReturn["GGMER06"] = " ".PadRight(0 ); 
         dwReturn["GGMER07"] = " ".PadRight(0 ); 
         dwReturn["GGBSTA"] = " ".PadRight(0 ); 
         dwReturn["GGBSTAN"] = " ".PadRight(0 ); 
         dwReturn["GGBSTKEN"] = " ".PadRight(0 ); 
         dwReturn["GGBSTKZU"] = " ".PadRight(0 ); 
         dwReturn["GGBSTKMA"] = " ".PadRight(0 ); 
         dwReturn["GGBSTKME"] = " ".PadRight(0 ); 
         dwReturn["GGBSTMA"] = " ".PadRight(0 ); 
         dwReturn["GGBSTME"] = " ".PadRight(0 ); 
         dwReturn["GGBSTVMA"] = " ".PadRight(0 ); 
         dwReturn["GGBSTVME"] = " ".PadRight(0 ); 
         dwReturn["GGMEIV"] = " ".PadRight(0 ); 
         dwReturn["GGINDAT"] = " ".PadRight(0 ); 
         dwReturn["GGINBST"] = " ".PadRight(0 ); 
         dwReturn["GGINALT"] = " ".PadRight(0 ); 
         dwReturn["GGEKPRMA"] = " ".PadRight(0 ); 
         dwReturn["GGEKPRME"] = " ".PadRight(0 ); 
         dwReturn["GGEKPRZU"] = " ".PadRight(0 ); 
         dwReturn["GGVRPR"] = " ".PadRight(0 ); 
         dwReturn["GGDLABST"] = " ".PadRight(0 ); 
         dwReturn["GGDLATAG"] = " ".PadRight(2 ); 
         dwReturn["GGMINBST"] = " ".PadRight(0 ); 
         dwReturn["GGMAXBST"] = " ".PadRight(0 ); 
         dwReturn["GGFERTKZ"] = " ".PadRight(1 ); 
         dwReturn["GGUEBER"] = " ".PadRight(1 ); 
         dwReturn["GGFILLER1"] = " ".PadRight(51 ); 
         dwReturn["GGAENDZL"] = " ".PadRight(0 ); 
         dwReturn["GGAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["GGAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["GGNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["GGNEUDAT"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapGGBST(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveGGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGGBST(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapGGBST(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertGGBST(dwLocal, ITXDBVERSION);
            }
            UpdateGGBST(dwLocal);
        }
        public void InsertGGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO GGBST(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryGGBST(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM GGBST WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM GGBST  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "GGBST";
            Return = Result;
            return Return;
        }
        public void DeleteGGBST(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM GGBST   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateGGBST(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE GGBST SET "
                    +"GGMANDANT= :GGMANDANT,"
                    +"GGSA= :GGSA,"
                    +"GGART= :GGART,"
                    +"GGVAR= :GGVAR,"
                    +"GGFARBE= :GGFARBE,"
                    +"GGZENSUR= :GGZENSUR,"
                    +"GGLO= :GGLO,"
                    +"GGMJJ= :GGMJJ,"
                    +"GGMM= :GGMM,"
                    +"GGAKTKZ= :GGAKTKZ,"
                    +"GGME01= :GGME01,"
                    +"GGME10= :GGME10,"
                    +"GGME11= :GGME11,"
                    +"GGME12= :GGME12,"
                    +"GGME13= :GGME13,"
                    +"GGME20= :GGME20,"
                    +"GGME21= :GGME21,"
                    +"GGME26= :GGME26,"
                    +"GGME27= :GGME27,"
                    +"GGME30= :GGME30,"
                    +"GGME31= :GGME31,"
                    +"GGME32= :GGME32,"
                    +"GGME33= :GGME33,"
                    +"GGME34= :GGME34,"
                    +"GGME35= :GGME35,"
                    +"GGME36= :GGME36,"
                    +"GGME37= :GGME37,"
                    +"GGME38= :GGME38,"
                    +"GGME40= :GGME40,"
                    +"GGME41= :GGME41,"
                    +"GGME42= :GGME42,"
                    +"GGME43= :GGME43,"
                    +"GGME46= :GGME46,"
                    +"GGME47= :GGME47,"
                    +"GGME50= :GGME50,"
                    +"GGME51= :GGME51,"
                    +"GGME52= :GGME52,"
                    +"GGME53= :GGME53,"
                    +"GGME55= :GGME55,"
                    +"GGME56= :GGME56,"
                    +"GGME57= :GGME57,"
                    +"GGME58= :GGME58,"
                    +"GGME73= :GGME73,"
                    +"GGME76= :GGME76,"
                    +"GGME77= :GGME77,"
                    +"GGME78= :GGME78,"
                    +"GGME80= :GGME80,"
                    +"GGME88= :GGME88,"
                    +"GGME89= :GGME89,"
                    +"GGME90= :GGME90,"
                    +"GGME91= :GGME91,"
                    +"GGME92= :GGME92,"
                    +"GGME93= :GGME93,"
                    +"GGMER03= :GGMER03,"
                    +"GGMER04= :GGMER04,"
                    +"GGMER05= :GGMER05,"
                    +"GGMER06= :GGMER06,"
                    +"GGMER07= :GGMER07,"
                    +"GGBSTA= :GGBSTA,"
                    +"GGBSTAN= :GGBSTAN,"
                    +"GGBSTKEN= :GGBSTKEN,"
                    +"GGBSTKZU= :GGBSTKZU,"
                    +"GGBSTKMA= :GGBSTKMA,"
                    +"GGBSTKME= :GGBSTKME,"
                    +"GGBSTMA= :GGBSTMA,"
                    +"GGBSTME= :GGBSTME,"
                    +"GGBSTVMA= :GGBSTVMA,"
                    +"GGBSTVME= :GGBSTVME,"
                    +"GGMEIV= :GGMEIV,"
                    +"GGINDAT= :GGINDAT,"
                    +"GGINBST= :GGINBST,"
                    +"GGINALT= :GGINALT,"
                    +"GGEKPRMA= :GGEKPRMA,"
                    +"GGEKPRME= :GGEKPRME,"
                    +"GGEKPRZU= :GGEKPRZU,"
                    +"GGVRPR= :GGVRPR,"
                    +"GGDLABST= :GGDLABST,"
                    +"GGDLATAG= :GGDLATAG,"
                    +"GGMINBST= :GGMINBST,"
                    +"GGMAXBST= :GGMAXBST,"
                    +"GGFERTKZ= :GGFERTKZ,"
                    +"GGUEBER= :GGUEBER,"
                    +"GGFILLER1= :GGFILLER1,"
                    +"GGAENDZL= :GGAENDZL,"
                    +"GGAENDBEN= :GGAENDBEN,"
                    +"GGAENDDAT= :GGAENDDAT,"
                    +"GGNEUBEN= :GGNEUBEN,"
                    +"GGNEUDAT= :GGNEUDAT,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("GGMANDANT", OracleType.NVarChar).Value = dwData["GGMANDANT"].ToString(); 
          or1.Parameters.Add("GGSA", OracleType.NVarChar).Value = dwData["GGSA"].ToString(); 
          or1.Parameters.Add("GGART", OracleType.NVarChar).Value = dwData["GGART"].ToString(); 
          or1.Parameters.Add("GGVAR", OracleType.NVarChar).Value = dwData["GGVAR"].ToString(); 
          or1.Parameters.Add("GGFARBE", OracleType.NVarChar).Value = dwData["GGFARBE"].ToString(); 
          or1.Parameters.Add("GGZENSUR", OracleType.NVarChar).Value = dwData["GGZENSUR"].ToString(); 
          or1.Parameters.Add("GGLO", OracleType.NVarChar).Value = dwData["GGLO"].ToString(); 
          or1.Parameters.Add("GGMJJ", OracleType.NVarChar).Value = dwData["GGMJJ"].ToString(); 
          or1.Parameters.Add("GGMM", OracleType.NVarChar).Value = dwData["GGMM"].ToString(); 
          or1.Parameters.Add("GGAKTKZ", OracleType.NVarChar).Value = dwData["GGAKTKZ"].ToString(); 
          or1.Parameters.Add("GGME01", OracleType.NVarChar).Value = dwData["GGME01"].ToString(); 
          or1.Parameters.Add("GGME10", OracleType.NVarChar).Value = dwData["GGME10"].ToString(); 
          or1.Parameters.Add("GGME11", OracleType.NVarChar).Value = dwData["GGME11"].ToString(); 
          or1.Parameters.Add("GGME12", OracleType.NVarChar).Value = dwData["GGME12"].ToString(); 
          or1.Parameters.Add("GGME13", OracleType.NVarChar).Value = dwData["GGME13"].ToString(); 
          or1.Parameters.Add("GGME20", OracleType.NVarChar).Value = dwData["GGME20"].ToString(); 
          or1.Parameters.Add("GGME21", OracleType.NVarChar).Value = dwData["GGME21"].ToString(); 
          or1.Parameters.Add("GGME26", OracleType.NVarChar).Value = dwData["GGME26"].ToString(); 
          or1.Parameters.Add("GGME27", OracleType.NVarChar).Value = dwData["GGME27"].ToString(); 
          or1.Parameters.Add("GGME30", OracleType.NVarChar).Value = dwData["GGME30"].ToString(); 
          or1.Parameters.Add("GGME31", OracleType.NVarChar).Value = dwData["GGME31"].ToString(); 
          or1.Parameters.Add("GGME32", OracleType.NVarChar).Value = dwData["GGME32"].ToString(); 
          or1.Parameters.Add("GGME33", OracleType.NVarChar).Value = dwData["GGME33"].ToString(); 
          or1.Parameters.Add("GGME34", OracleType.NVarChar).Value = dwData["GGME34"].ToString(); 
          or1.Parameters.Add("GGME35", OracleType.NVarChar).Value = dwData["GGME35"].ToString(); 
          or1.Parameters.Add("GGME36", OracleType.NVarChar).Value = dwData["GGME36"].ToString(); 
          or1.Parameters.Add("GGME37", OracleType.NVarChar).Value = dwData["GGME37"].ToString(); 
          or1.Parameters.Add("GGME38", OracleType.NVarChar).Value = dwData["GGME38"].ToString(); 
          or1.Parameters.Add("GGME40", OracleType.NVarChar).Value = dwData["GGME40"].ToString(); 
          or1.Parameters.Add("GGME41", OracleType.NVarChar).Value = dwData["GGME41"].ToString(); 
          or1.Parameters.Add("GGME42", OracleType.NVarChar).Value = dwData["GGME42"].ToString(); 
          or1.Parameters.Add("GGME43", OracleType.NVarChar).Value = dwData["GGME43"].ToString(); 
          or1.Parameters.Add("GGME46", OracleType.NVarChar).Value = dwData["GGME46"].ToString(); 
          or1.Parameters.Add("GGME47", OracleType.NVarChar).Value = dwData["GGME47"].ToString(); 
          or1.Parameters.Add("GGME50", OracleType.NVarChar).Value = dwData["GGME50"].ToString(); 
          or1.Parameters.Add("GGME51", OracleType.NVarChar).Value = dwData["GGME51"].ToString(); 
          or1.Parameters.Add("GGME52", OracleType.NVarChar).Value = dwData["GGME52"].ToString(); 
          or1.Parameters.Add("GGME53", OracleType.NVarChar).Value = dwData["GGME53"].ToString(); 
          or1.Parameters.Add("GGME55", OracleType.NVarChar).Value = dwData["GGME55"].ToString(); 
          or1.Parameters.Add("GGME56", OracleType.NVarChar).Value = dwData["GGME56"].ToString(); 
          or1.Parameters.Add("GGME57", OracleType.NVarChar).Value = dwData["GGME57"].ToString(); 
          or1.Parameters.Add("GGME58", OracleType.NVarChar).Value = dwData["GGME58"].ToString(); 
          or1.Parameters.Add("GGME73", OracleType.NVarChar).Value = dwData["GGME73"].ToString(); 
          or1.Parameters.Add("GGME76", OracleType.NVarChar).Value = dwData["GGME76"].ToString(); 
          or1.Parameters.Add("GGME77", OracleType.NVarChar).Value = dwData["GGME77"].ToString(); 
          or1.Parameters.Add("GGME78", OracleType.NVarChar).Value = dwData["GGME78"].ToString(); 
          or1.Parameters.Add("GGME80", OracleType.NVarChar).Value = dwData["GGME80"].ToString(); 
          or1.Parameters.Add("GGME88", OracleType.NVarChar).Value = dwData["GGME88"].ToString(); 
          or1.Parameters.Add("GGME89", OracleType.NVarChar).Value = dwData["GGME89"].ToString(); 
          or1.Parameters.Add("GGME90", OracleType.NVarChar).Value = dwData["GGME90"].ToString(); 
          or1.Parameters.Add("GGME91", OracleType.NVarChar).Value = dwData["GGME91"].ToString(); 
          or1.Parameters.Add("GGME92", OracleType.NVarChar).Value = dwData["GGME92"].ToString(); 
          or1.Parameters.Add("GGME93", OracleType.NVarChar).Value = dwData["GGME93"].ToString(); 
          or1.Parameters.Add("GGMER03", OracleType.NVarChar).Value = dwData["GGMER03"].ToString(); 
          or1.Parameters.Add("GGMER04", OracleType.NVarChar).Value = dwData["GGMER04"].ToString(); 
          or1.Parameters.Add("GGMER05", OracleType.NVarChar).Value = dwData["GGMER05"].ToString(); 
          or1.Parameters.Add("GGMER06", OracleType.NVarChar).Value = dwData["GGMER06"].ToString(); 
          or1.Parameters.Add("GGMER07", OracleType.NVarChar).Value = dwData["GGMER07"].ToString(); 
          or1.Parameters.Add("GGBSTA", OracleType.NVarChar).Value = dwData["GGBSTA"].ToString(); 
          or1.Parameters.Add("GGBSTAN", OracleType.NVarChar).Value = dwData["GGBSTAN"].ToString(); 
          or1.Parameters.Add("GGBSTKEN", OracleType.NVarChar).Value = dwData["GGBSTKEN"].ToString(); 
          or1.Parameters.Add("GGBSTKZU", OracleType.NVarChar).Value = dwData["GGBSTKZU"].ToString(); 
          or1.Parameters.Add("GGBSTKMA", OracleType.NVarChar).Value = dwData["GGBSTKMA"].ToString(); 
          or1.Parameters.Add("GGBSTKME", OracleType.NVarChar).Value = dwData["GGBSTKME"].ToString(); 
          or1.Parameters.Add("GGBSTMA", OracleType.NVarChar).Value = dwData["GGBSTMA"].ToString(); 
          or1.Parameters.Add("GGBSTME", OracleType.NVarChar).Value = dwData["GGBSTME"].ToString(); 
          or1.Parameters.Add("GGBSTVMA", OracleType.NVarChar).Value = dwData["GGBSTVMA"].ToString(); 
          or1.Parameters.Add("GGBSTVME", OracleType.NVarChar).Value = dwData["GGBSTVME"].ToString(); 
          or1.Parameters.Add("GGMEIV", OracleType.NVarChar).Value = dwData["GGMEIV"].ToString(); 
          or1.Parameters.Add("GGINDAT", OracleType.NVarChar).Value = dwData["GGINDAT"].ToString(); 
          or1.Parameters.Add("GGINBST", OracleType.NVarChar).Value = dwData["GGINBST"].ToString(); 
          or1.Parameters.Add("GGINALT", OracleType.NVarChar).Value = dwData["GGINALT"].ToString(); 
          or1.Parameters.Add("GGEKPRMA", OracleType.NVarChar).Value = dwData["GGEKPRMA"].ToString(); 
          or1.Parameters.Add("GGEKPRME", OracleType.NVarChar).Value = dwData["GGEKPRME"].ToString(); 
          or1.Parameters.Add("GGEKPRZU", OracleType.NVarChar).Value = dwData["GGEKPRZU"].ToString(); 
          or1.Parameters.Add("GGVRPR", OracleType.NVarChar).Value = dwData["GGVRPR"].ToString(); 
          or1.Parameters.Add("GGDLABST", OracleType.NVarChar).Value = dwData["GGDLABST"].ToString(); 
          or1.Parameters.Add("GGDLATAG", OracleType.NVarChar).Value = dwData["GGDLATAG"].ToString(); 
          or1.Parameters.Add("GGMINBST", OracleType.NVarChar).Value = dwData["GGMINBST"].ToString(); 
          or1.Parameters.Add("GGMAXBST", OracleType.NVarChar).Value = dwData["GGMAXBST"].ToString(); 
          or1.Parameters.Add("GGFERTKZ", OracleType.NVarChar).Value = dwData["GGFERTKZ"].ToString(); 
          or1.Parameters.Add("GGUEBER", OracleType.NVarChar).Value = dwData["GGUEBER"].ToString(); 
          or1.Parameters.Add("GGFILLER1", OracleType.NVarChar).Value = dwData["GGFILLER1"].ToString(); 
          or1.Parameters.Add("GGAENDZL", OracleType.NVarChar).Value = dwData["GGAENDZL"].ToString(); 
          or1.Parameters.Add("GGAENDBEN", OracleType.NVarChar).Value = dwData["GGAENDBEN"].ToString(); 
          or1.Parameters.Add("GGAENDDAT", OracleType.NVarChar).Value = dwData["GGAENDDAT"].ToString(); 
          or1.Parameters.Add("GGNEUBEN", OracleType.NVarChar).Value = dwData["GGNEUBEN"].ToString(); 
          or1.Parameters.Add("GGNEUDAT", OracleType.NVarChar).Value = dwData["GGNEUDAT"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
